<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ page import="java.util.*" %>
<%@ page import="org.jwos.plugin.file.web.*" %>
<%@ page import="org.jwos.platform.ajax.*" %>
<%@ page import="org.jwos.platform.domain.*" %>
<%@ page import="org.jwos.plugin.file.service.*" %>
<%
String node = request.getParameter("node");
String sessionId = request.getParameter("sessionId");
FileManager service = (FileManager)ServiceFactory.getService(request.getSession().getServletContext(),"fileManager");
List list = null;
if(node!=null && node.trim().length()>0) {	
	list = service.getSubFoldersByParent(sessionId,node);
} else {
	list = service.getAllFolderTree(sessionId);	
}
out.println(JSONCoder.encode(list));
%>